/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

import dao.EvenementDAO;
import dao.KitDAO;
import dao.OnligneDAO;
import dao.TransDAO;
import dao.VenteDAO;
import entity.Kit;
import entity.Onligne;
import entity.Vente;
import java.util.List;
import javax.faces.bean.ManagedBean;
import javax.faces.bean.RequestScoped;
import org.jboss.weld.context.ejb.Ejb;

/**
 *
 * @author linos
 */
@ManagedBean(name = "specVente")
@RequestScoped
public class SpectacleVente {

    @Ejb
    EvenementDAO evenementDAO=new EvenementDAO();
    Integer Id_event;
    @Ejb
    VenteDAO venteDAO=new VenteDAO();
    TransDAO TransDAO = new TransDAO();
    @Ejb
    OnligneDAO onligneDAO=new OnligneDAO();
    @Ejb
    KitDAO kitDAO;
    List<Kit> kits;
    List<Vente> ventes;
    List<Onligne> onls;

    public SpectacleVente() {
    }

    public List<Kit> getKits() {
        return kits;
    }

    public void setKits(List<Kit> kits) {
        this.kits = kits;
    }

    public List<Vente> getVentes() {
        return ventes;
    }

    public void setVentes(List<Vente> ventes) {
        this.ventes = ventes;
    }

    public List<Onligne> getOnls() {
        return onls;
    }

    public void setOnls(List<Onligne> onls) {
        this.onls = onls;
    }

    public Integer getId_event() {
        return Id_event;
    }

    public void setId_event(Integer Id_event) {
        this.Id_event = Id_event;
    }
    public void recherche()
    {
        System.out.println("ID event="+Id_event);
        
        ventes=venteDAO.findByEvent(Id_event);
        System.out.println("vente size="+ventes.size());
    }
    
}
